import request from '@/utils/request'

// 查询设备报修列表
export function listMaintenance(query) {
  return request({
    url: '/jwxt/maintenance/list',
    method: 'get',
    params: query
  })
}

// 查询设备报修详细
export function getMaintenance(repairId) {
  return request({
    url: '/jwxt/maintenance/' + repairId,
    method: 'get'
  })
}

// 新增设备报修
export function addMaintenance(data) {
  return request({
    url: '/jwxt/maintenance',
    method: 'post',
    data: data
  })
}

// 修改设备报修
export function updateMaintenance(data) {
  return request({
    url: '/jwxt/maintenance',
    method: 'put',
    data: data
  })
}

// 删除设备报修
export function delMaintenance(repairId) {
  return request({
    url: '/jwxt/maintenance/' + repairId,
    method: 'delete'
  })
}

// 获取教师列表
export function getTeaIdData(){
  return request({
    url:'/jwxt/utils/getRoleList',
    method:'get',
    params: {'target':'teacher'}
  })
}

// 获取实验室列表
export function getLabIdData(){
  return request({
    url:'/jwxt/labs/listAll',
    method:'get'
  })
}
